package org.kanstantin.irrp;

import javax.xml.XMLConstants;
import javax.xml.namespace.NamespaceContext;
import java.util.Iterator;

public class XNameSpaceContext implements NamespaceContext  {

    public String getNamespaceURI(String prefix) {
        if ("x".equals(prefix)) {
            return "http://www.w3.org/xhtml";
        }
        else if (prefix == null) {
            throw new NullPointerException("Null prefix specified");
        }
        return XMLConstants.NULL_NS_URI;  //To change body of implemented methods use File | Settings | File Templates.
    }

    public String getPrefix(String namespaceURI) {
        throw new UnsupportedOperationException();
    }

    public Iterator getPrefixes(String namespaceURI) {
        throw new UnsupportedOperationException();
    }
}
